package com.xuecheng.manage_media.config;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.ExchangeBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;



/*
 * rabbitmq的配置类
 */
@Configuration
public class RabbitMQConfig {
    
    //交换机的名称
    public final static String EX_MEDIA_PROCESSTASK = "ex_media_processor";
     
    
    //注册交换机
    @Bean(EX_MEDIA_PROCESSTASK)
    public Exchange EX_MEDIA_VIDEOTASK() {
        return ExchangeBuilder.directExchange(EX_MEDIA_PROCESSTASK).durable(true).build();
    }
       
}
